package com.zhuandaonet.manager.web.controller;

import com.zhuandaonet.common.domain.CommonResp;
import com.zhuandaonet.common.utils.RespUtils;
import com.zhuandaonet.manager.api.RoleServiceApi;
import com.zhuandaonet.manager.req.RoleReq;
import com.zhuandaonet.manager.resp.RoleResp;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RequestMapping("/manager/web/role")
@RestController
public class RoleController {

    @Resource
    RoleServiceApi roleServiceApi;

    @PostMapping
    public CommonResp add(@RequestBody RoleReq req){
        RoleResp resp = roleServiceApi.add(req);
        return RespUtils.succeed(resp);
    }

}

